'use strict';

const axios = require('axios');
const baseURL = process.env.ZJ_CLI_BASE_URL || 'http://127.0.0.1:7001';
const request = axios.create({
  baseURL,
  timeout: 5000,
})

request.interceptors.response.use(response => {
  return response.data
}, error => {
  return Promise.reject(error)
})


module.exports = request;
